<template>
  <div>
    <!-- 年度开工率 -->
    <Echart
      :options="options"
      :id="'line'+Math.random()"
      :height="cdata.height"
      width="100%"
    ></Echart>
  </div>
</template>

<script>
import Echart from "@/common/echart";


export default {
  props:["cdata"],
  data() {
    return {
      options: {
        title: {
          left: 'right',
    subtext: '图表标题'
  },
  xAxis: {
    type: 'category',
    data: this.cdata.category
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data:this.cdata.lineData[0],
      type: 'line',
      smooth: true,
       itemStyle: {
              normal: {
                lineStyle: {
                  width: 5,
                  type: "dotted", //'dotted'虚线 'solid'实线
                },
                color:this.cdata.linecolor[0]
              },
            },
    },
     {
      data: this.cdata.lineData[1],
      type: 'line',
      smooth: true,
       itemStyle: {
              normal: {
                lineStyle: {
                  width: 5,
                  type: "dotted", //'dotted'虚线 'solid'实线
                },
                color:this.cdata.linecolor[1]
              },
            },
    },
     {
      data: this.cdata.lineData[2],
      type: 'line',
      smooth: true,
       itemStyle: {
              normal: {
                lineStyle: {
                  width: 5,
                  type: "dotted", //'dotted'虚线 'solid'实线
                },
                color:this.cdata.linecolor[2]
              },
            },
    }
  ]
},
    };
  },
  components: {
    Echart,
  },
 
  methods:{

  },
};
</script>